import Layout from '@/layout';
const meta = {
	auth: true
};
const _import = require('@/utils/util.import.' + process.env.NODE_ENV);

export default {
	path: '/mes',
	component: Layout,
	name: 'mes',
	meta,
	redirect: {
		name: 'mes_production_wo_initial'
	},
	children: (pre => [
		// {
		// 	path: '/mes/production/workorder_initial',
		// 	component: _import('modules/mes/production/workorder_initial.vue'),
		// 	name: `${pre}production_wo_initial`,
		// 	meta: {
		// 		...meta,
		// 		title: '工单开立'
		// 	}
		// },
		{
			path: '/mes/production/workorder_initial_dk',
			component: _import('modules/mes/production/workorder_initial_dk.vue'),
			name: `${pre}production_wo_initial_dk`,
			meta: {
				...meta,
				title: '电控工单开立'
			}
		},
		{
			path: '/mes/production/workorder_initial_sc',
			component: _import('modules/mes/production/workorder_initial_sc.vue'),
			name: `${pre}production_wo_initial_sc`,
			meta: {
				...meta,
				title: '生产工单开立'
			}
		},
		{
			path: '/mes/production/workorder_initial_zp',
			component: _import('modules/mes/production/workorder_initial_zp.vue'),
			name: `${pre}production_wo_initial_zp`,
			meta: {
				...meta,
				title: '装配工单开立'
			}
		},
		{
			path: '/mes/production/material_complete_query',
			component: _import('modules/mes/production/material_complete_query'),
			name: `${pre}material_complete_query`,
			meta: {
				...meta,
				title: '物料齐套查询'
			}
		},
		{
			path: '/mes/production/workorder_manager',
			component: _import('modules/mes/production/workorder_manager.vue'),
			name: `${pre}production_wo_manager`,
			meta: {
				...meta,
				title: '工单管理'
			}
		},
		{
			path: '/mes/production/putcost',
			component: _import('modules/mes/production/putcost.vue'),
			name: `${pre}production_putcost`,
			meta: {
				...meta,
				title: '工单打印'
			}
		},
		{
			path: '/mes/production/putcost_steel',
			component: _import('modules/mes/production/putcost_steel.vue'),
			name: `${pre}production_putcost_steel`,
			meta: {
				...meta,
				title: '机加开料'
			}
		},
		{
			path: '/mes/production/getwo_material',
			component: _import('modules/mes/production/getwo_material.vue'),
			name: `${pre}production_getwo_material`,
			meta: {
				...meta,
				title: '工单领料'
			}
		},
		// {
		// 	path: '/mes/production/gettwo_material_edit_transferorder',
		// 	component: _import('modules/mes/production/gettwo_material_edit_transferorder.vue'),
		// 	name: `${pre}production_gettwo_material_edit_transferorder`,
		// 	meta: {
		// 		...meta,
		// 		title: '工单领料-调拨单'
		// 	}
		// },
		{
			path: '/mes/production/postbill_manufacturing',
			component: _import('modules/mes/production/postbill_manufacturing.vue'),
			name: `${pre}production_postbill_manufacturing`,
			meta: {
				...meta,
				title: '生产过账'
			}
		},
		{
			path: '/mes/production/postbill_assembly',
			component: _import('modules/mes/production/postbill_assembly.vue'),
			name: `${pre}production_postbill_assembly`,
			meta: {
				...meta,
				title: '装配过账'
			}
		},
		{
			path: '/mes/production/outsource',
			component: _import('modules/mes/production/outsource.vue'),
			name: `${pre}production_outsource`,
			meta: {
				...meta,
				title: '委外出'
			}
		},
		{
			path: '/mes/production/outsource_back',
			component: _import('modules/mes/production/outsource_back.vue'),
			name: `${pre}production_outsource_back`,
			meta: {
				...meta,
				title: '委外入'
			}
		},
		{
			path: '/mes/production/product_delivery',
			component: _import('modules/mes/production/product_delivery.vue'),
			name: `${pre}production_product_delivery`,
			meta: {
				...meta,
				title: '成品发货'
			}
		},
		{
			path: '/mes/production/order_production',
			component: _import('modules/mes/production/order_production.vue'),
			name: `${pre}production_order_production`,
			meta: {
				...meta,
				title: '生产订单'
			}
		},
		{
			path: '/mes/production/order_wout',
			component: _import('modules/mes/production/order_wout.vue'),
			name: `${pre}production_order_wout`,
			meta: {
				...meta,
				title: '委外订单'
			}
		},
		{
			path: '/mes/production/production_task_beyond',
			component: _import('modules/mes/production/production_task_beyond.vue'),
			name: `${pre}production_task_beyond`,
			meta: {
				...meta,
				title: '生产任务超期看板'
			}
		},
		{
			path: '/mes/production/project_equi_production_progress',
			component: _import('modules/mes/production/project_equi_production_progress.vue'),
			name: `${pre}project_equi_production_progress`,
			meta: {
				...meta,
				title: '生产进度'
			}
		},
		
		
		{
			path: '/mes/qms/outsource_check',
			component: _import('modules/mes/qms/outsource_check.vue'),
			name: `${pre}qms_outsource_check`,
			meta: {
				...meta,
				title: '委外出检验'
			}
		},
		{
			path: '/mes/qms/outsource_backcheck',
			component: _import('modules/mes/qms/outsource_backcheck.vue'),
			name: `${pre}qms_outsource_backcheck`,
			meta: {
				...meta,
				title: '委外入检验'
			}
		},
		{
			path: '/mes/qms/manufacture_check',
			component: _import('modules/mes/qms/manufacture_check.vue'),
			name: `${pre}qms_manufacture_check`,
			meta: {
				...meta,
				title: '生产加工检'
			}
		},
		{
			path: '/mes/qms/assembly_check',
			component: _import('modules/mes/qms/assembly_check.vue'),
			name: `${pre}qms_assembly_check`,
			meta: {
				...meta,
				title: '装配检验'
			}
		},
		{
			path: '/mes/qms/process_check',
			component: _import('modules/mes/qms/process_check.vue'),
			name: `${pre}qms_process_check`,
			meta: {
				...meta,
				title: '过程检验'
			}
		},
		{
			path: '/mes/qms/andon_handler',
			component: _import('modules/mes/qms/andon_handler.vue'),
			name: `${pre}qms_andon_handler`,
			meta: {
				...meta,
				title: '异常处理'
			}
		},
		{
			path: '/mes/qms/product_delivery_oqc',
			component: _import('modules/mes/qms/product_delivery_oqc.vue'),
			name: `${pre}qms_product_delivery_oqc`,
			meta: {
				...meta,
				title: '出货检验'
			}
		},
		// {
		// 	path: '/mes/reportor/postbill',
		// 	component: _import('modules/mes/reportor/postbill.vue'),
		// 	name: `${pre}reportor_postbill`,
		// 	meta: {
		// 		...meta,
		// 		title: '过账报表'
		// 	}
		// },
		{
			path: '/mes/reportor/mes_production_value',
			component: _import('modules/mes/reportor/mes_production_value.vue'),
			name: `${pre}mes_production_value`,
			meta: {
				...meta,
				title: '产值报表'
			}
		},
		{
			path: '/mes/reportor/mes_production_qapass',
			component: _import('modules/mes/reportor/mes_production_qapass.vue'),
			name: `${pre}mes_production_qapass`,
			meta: {
				...meta,
				title: '产品直通率报表'
			}
		},
		{
			path: '/mes/reportor/mes_percapita_gdp',
			component: _import('modules/mes/reportor/mes_percapita_gdp.vue'),
			name: `${pre}mes_percapita_gdp`,
			meta: {
				...meta,
				title: '人均劳动产出报表'
			}
		},{
			path: '/mes/reportor/mes_production_yieldrate',
			component: _import('modules/mes/reportor/mes_production_yieldrate'),
			name: `${pre}mes_production_yieldrate`,
			meta: {
				...meta,
				title: '生产任务达成率报表'
			}
		},
	])('mes_')
};
